import request from '@/utils/request.js';

// 获取首页被爱供养的猫咪
export function getHomeAdoptedCatList() {
  return request({
    url: '/core/cloud/adopt/record/homepage/area',
    method: 'get',
  });
}
// 首页领养播报信息
export function getNoticeList() {
  return request({
    url: '/core/adopt/report',
    method: 'get',
  });
}
// 首页分区列表
export function getAreaList() {
  return request({
    url: '/core/cloud/adopt/area/index/list',
    method: 'get',
  });
}
// 云认养飘屏
export function getFloatingScreen() {
  return request({
    url: '/core/cloud/adopt/record/broadcast',
    method: 'get',
  });
}
//勋章的说明
export function getMedalDetail(name) {
  return request({
    url: `/core/badge/info/detail/name/${name}`,
    method: 'get',
  });
}
// 云养续费检查
export function checkCloudPetRenew(petId) {
  return request({
    url: `/core/cloud/adopt/record/renew/check/${petId}`,
    method: 'post',
  });
}
// 获取云养套餐
export function getCloudAdoptCombo() {
  return request({
    url: '/core/cloud/adopt/pack/page?size=200&current=1&status=1',
    method: 'get',
  });
}
//获取区域信息
export function getCloudAreaInfo(areaId) {
  return request({
    url: `/core/cloud/adopt/area/${areaId}`,
    method: 'get',
  });
}
// 确认支付
export function cloudAdoptOrderSubmit(data) {
  return request({
    url: '/core/virtual/order/order/check',
    method: 'post',
    data,
  });
}
//获取抖音支付参数
export function getTTPayParam(sn) {
  return request({
    url: `/core/virtual/trade/tiktok/applet/${sn}`,
    method: 'get',
  });
}
///
export function getTiktokPayParamOfPet(sn) {
  return request({
    url: `/core/virtual/trade/tiktok/applet/token/${sn}`,
    method: 'get',
  });
}
//绑定抖音的订单号
export function bindPetTiktokOrderId(data, sn) {
  return request({
    url: `/core/virtual/trade/tiktok/applet/bind/${sn}`,
    method: 'post',
    data,
  });
}
//检测署名是否合法
export function cloudNameCheck(data) {
  return request({
    url: '/core/virtual/order/check/sign',
    method: 'post',
    data,
  });
}